<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::ml::SVM Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d8/df1/namespacecv_1_1ml.html">ml</a></li><li class="navelem"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html">SVM</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="../../d1/d05/classcv_1_1ml_1_1SVM-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::ml::SVM Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../dd/ded/group__ml.html">Machine Learning</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Support Vector Machines.  
 <a href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#details">More...</a></p>
<p><code>#include &lt;opencv2/ml.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::ml::SVM:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../d1/d2d/classcv_1_1ml_1_1SVM.png" usemap="#cv::ml::SVM_map"/>
  <map id="cv::ml::SVM_map" name="cv::ml::SVM_map">
<area alt="cv::ml::StatModel" coords="0,56,106,80" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html" shape="rect" title="Base class for statistical models in OpenCV ML. "/>
<area alt="cv::Algorithm" coords="0,0,106,24" href="../../d3/d46/classcv_1_1Algorithm.html" shape="rect" title="This is a base class for all more or less complex algorithms in OpenCV. "/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/db8/classcv_1_1ml_1_1SVM_1_1Kernel.html">Kernel</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aad7f1aaccced3c33bb256640910a0e56"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56">KernelTypes</a> { <br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56adc68154e13627786e405117dd64012a5">CUSTOM</a> =-1, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56ab92a19ab0c193735c3fd71f938dd87e7">LINEAR</a> =0, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a5fa32d793cd5f5d0bf64f55bb94a3f2e">POLY</a> =1, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a8e1f51ebeabd14cbd622f0f945831d4c">RBF</a> =2, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56ac40981025a9b8f3c1cd35cb015aac5cc">SIGMOID</a> =3, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a66a909b8add6114fde309d24483bcf82">CHI2</a> =4, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a9dec0ceda288deaa617c4c65c88852ae">INTER</a> =5
<br/>
 }<tr class="memdesc:aad7f1aaccced3c33bb256640910a0e56"><td class="mdescLeft"> </td><td class="mdescRight">SVM kernel type  <a href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:aad7f1aaccced3c33bb256640910a0e56"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a32d2e8d21aaa4f58cdf9c27c102becf3"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3">ParamTypes</a> { <br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a8eafc49ef685613b37e1b96351fd2bd1">C</a> =0, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a9b81805a0cd06dc59c354b0ad6fc9e9a">GAMMA</a> =1, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae14aa4668daf05a4ea6918b10806acd5">P</a> =2, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae0c1409f55f0158101fcc5e07f095605">NU</a> =3, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae7112825b482d70cf5f04bc571f86e57">COEF</a> =4, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a61a897bf6519f4be834ce379a1543869">DEGREE</a> =5
<br/>
 }<tr class="memdesc:a32d2e8d21aaa4f58cdf9c27c102becf3"><td class="mdescLeft"> </td><td class="mdescRight">SVM params type  <a href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:a32d2e8d21aaa4f58cdf9c27c102becf3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab4b93a4c42bbe213ffd9fb3832c6c44f"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44f">Types</a> { <br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">C_SVC</a> =100, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa50c44a78c88f3cde09599fba4347134d">NU_SVC</a> =101, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa6951543a0c14a17a7e16d212b1e7dcaf">ONE_CLASS</a> =102, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fac6fd17721f6a7b5c10f3ae48b78ed944">EPS_SVR</a> =103, 
<br/>
  <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa5b4b7e4b189d47be1765b3c6b19f6c80">NU_SVR</a> =104
<br/>
 }<tr class="memdesc:ab4b93a4c42bbe213ffd9fb3832c6c44f"><td class="mdescLeft"> </td><td class="mdescRight">SVM type  <a href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44f">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ab4b93a4c42bbe213ffd9fb3832c6c44f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_types_classcv_1_1ml_1_1StatModel"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classcv_1_1ml_1_1StatModel')"><img alt="-" src="../../closed.png"/> Public Types inherited from <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html">cv::ml::StatModel</a></td></tr>
<tr class="memitem:af1ea864e1c19796e6264ebb3950c0b9a inherit pub_types_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af1ea864e1c19796e6264ebb3950c0b9a">Flags</a> { <br/>
  <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af1ea864e1c19796e6264ebb3950c0b9aa397fde9eaadd4efb07af6a7fbacea6cd">UPDATE_MODEL</a> = 1, 
<br/>
  <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af1ea864e1c19796e6264ebb3950c0b9aa639a8ea2b61c2bf03f87cf4c4a5bd824">RAW_OUTPUT</a> =1, 
<br/>
  <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af1ea864e1c19796e6264ebb3950c0b9aae860ef9fda481bb6730e8794009c99b5">COMPRESSED_INPUT</a> =2, 
<br/>
  <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af1ea864e1c19796e6264ebb3950c0b9aa0cdfa2b3b9c5947d9a80bcca7eac485f">PREPROCESSED_INPUT</a> =4
<br/>
 }</td></tr>
<tr class="separator:af1ea864e1c19796e6264ebb3950c0b9a inherit pub_types_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a77d9a35898cae44ac9071c4b35bc96a8"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a77d9a35898cae44ac9071c4b35bc96a8">getC</a> () const =0</td></tr>
<tr class="separator:a77d9a35898cae44ac9071c4b35bc96a8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abca95c581c70bf46625d1b6fda723ea7"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#abca95c581c70bf46625d1b6fda723ea7">getClassWeights</a> () const =0</td></tr>
<tr class="separator:abca95c581c70bf46625d1b6fda723ea7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a87ca59782f9bd71db63602fa439a791e"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a87ca59782f9bd71db63602fa439a791e">getCoef0</a> () const =0</td></tr>
<tr class="separator:a87ca59782f9bd71db63602fa439a791e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a63ebdd598b0c30942130ed4768f2836e"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a63ebdd598b0c30942130ed4768f2836e">getDecisionFunction</a> (int i, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> alpha, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> svidx) const =0</td></tr>
<tr class="memdesc:a63ebdd598b0c30942130ed4768f2836e"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the decision function.  <a href="#a63ebdd598b0c30942130ed4768f2836e">More...</a><br/></td></tr>
<tr class="separator:a63ebdd598b0c30942130ed4768f2836e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e8b98786b1a14925cb571cf17b858e8"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a0e8b98786b1a14925cb571cf17b858e8">getDegree</a> () const =0</td></tr>
<tr class="separator:a0e8b98786b1a14925cb571cf17b858e8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5af1a2ed6d9c0c9e4eae6b749ae61439"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a5af1a2ed6d9c0c9e4eae6b749ae61439">getGamma</a> () const =0</td></tr>
<tr class="separator:a5af1a2ed6d9c0c9e4eae6b749ae61439"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2aa20328f134790adfdd186526e32c46"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a2aa20328f134790adfdd186526e32c46">getKernelType</a> () const =0</td></tr>
<tr class="separator:a2aa20328f134790adfdd186526e32c46"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad1f4a836048fd63bb2509e9eb70a520b"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ad1f4a836048fd63bb2509e9eb70a520b">getNu</a> () const =0</td></tr>
<tr class="separator:ad1f4a836048fd63bb2509e9eb70a520b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3672572f111c14f7fd0d392db1709413"><td align="right" class="memItemLeft" valign="top">virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a3672572f111c14f7fd0d392db1709413">getP</a> () const =0</td></tr>
<tr class="separator:a3672572f111c14f7fd0d392db1709413"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2c3fb4b3c80b8fce0b8654f103339300"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a2c3fb4b3c80b8fce0b8654f103339300">getSupportVectors</a> () const =0</td></tr>
<tr class="memdesc:a2c3fb4b3c80b8fce0b8654f103339300"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves all the support vectors.  <a href="#a2c3fb4b3c80b8fce0b8654f103339300">More...</a><br/></td></tr>
<tr class="separator:a2c3fb4b3c80b8fce0b8654f103339300"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a11a5f5186656d7a45f7d70b85ad75e54"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">cv::TermCriteria</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a11a5f5186656d7a45f7d70b85ad75e54">getTermCriteria</a> () const =0</td></tr>
<tr class="separator:a11a5f5186656d7a45f7d70b85ad75e54"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a65c5ef227073493731ae8133bf372586"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a65c5ef227073493731ae8133bf372586">getType</a> () const =0</td></tr>
<tr class="separator:a65c5ef227073493731ae8133bf372586"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a40356a96b18fbf38c1d9f73f546844c9"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a40356a96b18fbf38c1d9f73f546844c9">getUncompressedSupportVectors</a> () const =0</td></tr>
<tr class="memdesc:a40356a96b18fbf38c1d9f73f546844c9"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves all the uncompressed support vectors of a linear SVM.  <a href="#a40356a96b18fbf38c1d9f73f546844c9">More...</a><br/></td></tr>
<tr class="separator:a40356a96b18fbf38c1d9f73f546844c9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af9f543ef011db0ded375bb6f68984142"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#af9f543ef011db0ded375bb6f68984142">setC</a> (double val)=0</td></tr>
<tr class="separator:af9f543ef011db0ded375bb6f68984142"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9cb80c3df6c2626b9836eaa0e0c58bf0"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9cb80c3df6c2626b9836eaa0e0c58bf0">setClassWeights</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> &amp;val)=0</td></tr>
<tr class="separator:a9cb80c3df6c2626b9836eaa0e0c58bf0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af0cd3684aabfacbd6749d8649d5971ed"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#af0cd3684aabfacbd6749d8649d5971ed">setCoef0</a> (double val)=0</td></tr>
<tr class="separator:af0cd3684aabfacbd6749d8649d5971ed"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a16a3ddfd7bad030268f024f5a6c561f1"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a16a3ddfd7bad030268f024f5a6c561f1">setCustomKernel</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d7/db8/classcv_1_1ml_1_1SVM_1_1Kernel.html">Kernel</a> &gt; &amp;_kernel)=0</td></tr>
<tr class="separator:a16a3ddfd7bad030268f024f5a6c561f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a756297055239fa33536c09b0f5721494"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a756297055239fa33536c09b0f5721494">setDegree</a> (double val)=0</td></tr>
<tr class="separator:a756297055239fa33536c09b0f5721494"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e15d72e1bbba64a9650ea65910135e7"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a1e15d72e1bbba64a9650ea65910135e7">setGamma</a> (double val)=0</td></tr>
<tr class="separator:a1e15d72e1bbba64a9650ea65910135e7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad6f4f45983d06817b9782978ca0f6f6f"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ad6f4f45983d06817b9782978ca0f6f6f">setKernel</a> (int kernelType)=0</td></tr>
<tr class="separator:ad6f4f45983d06817b9782978ca0f6f6f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa19ae35bcf07f52a4009ceeca583b113"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aa19ae35bcf07f52a4009ceeca583b113">setNu</a> (double val)=0</td></tr>
<tr class="separator:aa19ae35bcf07f52a4009ceeca583b113"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aed346ecd8b15379717053254ae067d96"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aed346ecd8b15379717053254ae067d96">setP</a> (double val)=0</td></tr>
<tr class="separator:aed346ecd8b15379717053254ae067d96"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6a86483c5518c332fedf6ec381a1daa7"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6a86483c5518c332fedf6ec381a1daa7">setTermCriteria</a> (const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">cv::TermCriteria</a> &amp;val)=0</td></tr>
<tr class="separator:a6a86483c5518c332fedf6ec381a1daa7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0dd2c2aea178a3c9136eda6443d5bb7b"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a0dd2c2aea178a3c9136eda6443d5bb7b">setType</a> (int val)=0</td></tr>
<tr class="separator:a0dd2c2aea178a3c9136eda6443d5bb7b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a533d3d3f950fed3f75be0d8692eeff58"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a533d3d3f950fed3f75be0d8692eeff58">trainAuto</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html">TrainData</a> &gt; &amp;data, int kFold=10, <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> Cgrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a8eafc49ef685613b37e1b96351fd2bd1">C</a>), <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> gammaGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a9b81805a0cd06dc59c354b0ad6fc9e9a">GAMMA</a>), <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> pGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae14aa4668daf05a4ea6918b10806acd5">P</a>), <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> nuGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae0c1409f55f0158101fcc5e07f095605">NU</a>), <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> coeffGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae7112825b482d70cf5f04bc571f86e57">COEF</a>), <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> degreeGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a61a897bf6519f4be834ce379a1543869">DEGREE</a>), bool balanced=false)=0</td></tr>
<tr class="memdesc:a533d3d3f950fed3f75be0d8692eeff58"><td class="mdescLeft"> </td><td class="mdescRight">Trains an SVM with optimal parameters.  <a href="#a533d3d3f950fed3f75be0d8692eeff58">More...</a><br/></td></tr>
<tr class="separator:a533d3d3f950fed3f75be0d8692eeff58"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ce36fa4ff20944f24554d8ddd1f1fbf"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a4ce36fa4ff20944f24554d8ddd1f1fbf">trainAuto</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> samples, int layout, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> responses, int kFold=10, <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; Cgrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a8eafc49ef685613b37e1b96351fd2bd1">SVM::C</a>), <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; gammaGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a9b81805a0cd06dc59c354b0ad6fc9e9a">SVM::GAMMA</a>), <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; pGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae14aa4668daf05a4ea6918b10806acd5">SVM::P</a>), <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; nuGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae0c1409f55f0158101fcc5e07f095605">SVM::NU</a>), <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; coeffGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae7112825b482d70cf5f04bc571f86e57">SVM::COEF</a>), <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; degreeGrid=<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a61a897bf6519f4be834ce379a1543869">SVM::DEGREE</a>), bool balanced=false)=0</td></tr>
<tr class="memdesc:a4ce36fa4ff20944f24554d8ddd1f1fbf"><td class="mdescLeft"> </td><td class="mdescRight">Trains an SVM with optimal parameters.  <a href="#a4ce36fa4ff20944f24554d8ddd1f1fbf">More...</a><br/></td></tr>
<tr class="separator:a4ce36fa4ff20944f24554d8ddd1f1fbf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1ml_1_1StatModel"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1ml_1_1StatModel')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html">cv::ml::StatModel</a></td></tr>
<tr class="memitem:aa6a71b1ee5b7fa0b07b55e77106cda13 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual float </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#aa6a71b1ee5b7fa0b07b55e77106cda13">calcError</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html">TrainData</a> &gt; &amp;data, bool test, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> resp) const</td></tr>
<tr class="memdesc:aa6a71b1ee5b7fa0b07b55e77106cda13 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Computes error on the training or test dataset.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#aa6a71b1ee5b7fa0b07b55e77106cda13">More...</a><br/></td></tr>
<tr class="separator:aa6a71b1ee5b7fa0b07b55e77106cda13 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a80afceed1710367d32d6232374162b97 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a80afceed1710367d32d6232374162b97">empty</a> () const <a class="el" href="../../db/de0/group__core__utils.html#ga4d89d63e402ef9ddc48e18e21180fe4a">CV_OVERRIDE</a></td></tr>
<tr class="memdesc:a80afceed1710367d32d6232374162b97 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html" title="This is a base class for all more or less complex algorithms in OpenCV. ">Algorithm</a> is empty (e.g. in the very beginning or after unsuccessful read.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a80afceed1710367d32d6232374162b97">More...</a><br/></td></tr>
<tr class="separator:a80afceed1710367d32d6232374162b97 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a783b92c436c7a2978e2d4bbb3cfb6e0c inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a783b92c436c7a2978e2d4bbb3cfb6e0c">getVarCount</a> () const =0</td></tr>
<tr class="memdesc:a783b92c436c7a2978e2d4bbb3cfb6e0c inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of variables in training samples.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a783b92c436c7a2978e2d4bbb3cfb6e0c">More...</a><br/></td></tr>
<tr class="separator:a783b92c436c7a2978e2d4bbb3cfb6e0c inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1121a835feedefdcdb8624966567aec6 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a1121a835feedefdcdb8624966567aec6">isClassifier</a> () const =0</td></tr>
<tr class="memdesc:a1121a835feedefdcdb8624966567aec6 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the model is classifier.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a1121a835feedefdcdb8624966567aec6">More...</a><br/></td></tr>
<tr class="separator:a1121a835feedefdcdb8624966567aec6 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aab380b59eb30b50254ef1b804774c4d8 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#aab380b59eb30b50254ef1b804774c4d8">isTrained</a> () const =0</td></tr>
<tr class="memdesc:aab380b59eb30b50254ef1b804774c4d8 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the model is trained.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#aab380b59eb30b50254ef1b804774c4d8">More...</a><br/></td></tr>
<tr class="separator:aab380b59eb30b50254ef1b804774c4d8 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1a7e49e1febd10392452727498771bc1 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual float </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a1a7e49e1febd10392452727498771bc1">predict</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> samples, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> results=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>(), int flags=0) const =0</td></tr>
<tr class="memdesc:a1a7e49e1febd10392452727498771bc1 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Predicts response(s) for the provided sample(s)  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#a1a7e49e1febd10392452727498771bc1">More...</a><br/></td></tr>
<tr class="separator:a1a7e49e1febd10392452727498771bc1 inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af96a0e04f1677a835cc25263c7db3c0c inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af96a0e04f1677a835cc25263c7db3c0c">train</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html">TrainData</a> &gt; &amp;trainData, int flags=0)</td></tr>
<tr class="memdesc:af96a0e04f1677a835cc25263c7db3c0c inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Trains the statistical model.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af96a0e04f1677a835cc25263c7db3c0c">More...</a><br/></td></tr>
<tr class="separator:af96a0e04f1677a835cc25263c7db3c0c inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aeb25a75f438864fb25af182fb4b1b96f inherit pub_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memItemLeft" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#aeb25a75f438864fb25af182fb4b1b96f">train</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> samples, int layout, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> responses)</td></tr>
<tr class="memdesc:aeb25a75f438864fb25af182fb4b1b96f inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Trains the statistical model.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#aeb25a75f438864fb25af182fb4b1b96f">More...</a><br/></td></tr>
<tr class="separator:aeb25a75f438864fb25af182fb4b1b96f inherit pub_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a827c8b2781ed17574805f373e6054ff1">Algorithm</a> ()</td></tr>
<tr class="separator:a827c8b2781ed17574805f373e6054ff1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a8ae826127fa0f1f8d10a24841bd376f8">~Algorithm</a> ()</td></tr>
<tr class="separator:a8ae826127fa0f1f8d10a24841bd376f8 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">clear</a> ()</td></tr>
<tr class="memdesc:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Clears the algorithm state.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aec9c965448e4dc851d7cacd3abd84cd1">More...</a><br/></td></tr>
<tr class="separator:aec9c965448e4dc851d7cacd3abd84cd1 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a286fc82744ccab3d248aca44524266a9">getDefaultName</a> () const</td></tr>
<tr class="separator:a286fc82744ccab3d248aca44524266a9 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm parameters from a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#aef2ad3f4145bd6e8c3664eb1c4b5e1e6">More...</a><br/></td></tr>
<tr class="separator:aef2ad3f4145bd6e8c3664eb1c4b5e1e6 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a0a880744bc4e3f45711444571df47d67">save</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename) const</td></tr>
<tr class="separator:a0a880744bc4e3f45711444571df47d67 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">write</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="memdesc:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Stores algorithm parameters in a file storage.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a1f8ad7b8add515077367fb9949a174d2">More...</a><br/></td></tr>
<tr class="separator:a1f8ad7b8add515077367fb9949a174d2 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">write</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &gt; &amp;fs, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;name=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()) const</td></tr>
<tr class="memdesc:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a763a62d1b03042eef7d7fc3ac6c87c79">More...</a><br/></td></tr>
<tr class="separator:a763a62d1b03042eef7d7fc3ac6c87c79 inherit pub_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a2fe8b5bf897c34b8e911397b42e2cb44"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html">SVM</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a2fe8b5bf897c34b8e911397b42e2cb44">create</a> ()</td></tr>
<tr class="separator:a2fe8b5bf897c34b8e911397b42e2cb44"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b2f6c05fc049ef837999d51486aa633"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a> (int param_id)</td></tr>
<tr class="memdesc:a6b2f6c05fc049ef837999d51486aa633"><td class="mdescLeft"> </td><td class="mdescRight">Generates a grid for SVM parameters.  <a href="#a6b2f6c05fc049ef837999d51486aa633">More...</a><br/></td></tr>
<tr class="separator:a6b2f6c05fc049ef837999d51486aa633"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9290154cae38e7441b2d51b00d66fa02"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">getDefaultGridPtr</a> (int param_id)</td></tr>
<tr class="memdesc:a9290154cae38e7441b2d51b00d66fa02"><td class="mdescLeft"> </td><td class="mdescRight">Generates a grid for SVM parameters.  <a href="#a9290154cae38e7441b2d51b00d66fa02">More...</a><br/></td></tr>
<tr class="separator:a9290154cae38e7441b2d51b00d66fa02"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b05db6110aec2246f2b31363937539c"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html">SVM</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a7b05db6110aec2246f2b31363937539c">load</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filepath)</td></tr>
<tr class="memdesc:a7b05db6110aec2246f2b31363937539c"><td class="mdescLeft"> </td><td class="mdescRight">Loads and creates a serialized svm from a file.  <a href="#a7b05db6110aec2246f2b31363937539c">More...</a><br/></td></tr>
<tr class="separator:a7b05db6110aec2246f2b31363937539c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_static_methods_classcv_1_1ml_1_1StatModel"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcv_1_1ml_1_1StatModel')"><img alt="-" src="../../closed.png"/> Static Public Member Functions inherited from <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html">cv::ml::StatModel</a></td></tr>
<tr class="memitem:af93a21ea5866cd305936a03742f69af8 inherit pub_static_methods_classcv_1_1ml_1_1StatModel"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:af93a21ea5866cd305936a03742f69af8 inherit pub_static_methods_classcv_1_1ml_1_1StatModel"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af93a21ea5866cd305936a03742f69af8">train</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html">TrainData</a> &gt; &amp;data, int flags=0)</td></tr>
<tr class="memdesc:af93a21ea5866cd305936a03742f69af8 inherit pub_static_methods_classcv_1_1ml_1_1StatModel"><td class="mdescLeft"> </td><td class="mdescRight">Create and train model with default parameters.  <a href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af93a21ea5866cd305936a03742f69af8">More...</a><br/></td></tr>
<tr class="separator:af93a21ea5866cd305936a03742f69af8 inherit pub_static_methods_classcv_1_1ml_1_1StatModel"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_static_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Static Public Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">load</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from the file.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a623841c33b58ea9c4847da04607e067b">More...</a><br/></td></tr>
<tr class="separator:a623841c33b58ea9c4847da04607e067b inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">loadFromString</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;strModel, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;objname=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Loads algorithm from a String.  <a href="../../d3/d46/classcv_1_1Algorithm.html#a3ba305a10d02479c13cf7d169c321547">More...</a><br/></td></tr>
<tr class="separator:a3ba305a10d02479c13cf7d169c321547 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td align="right" class="memTemplItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; _Tp &gt; </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">read</a> (const <a class="el" href="../../de/dd9/classcv_1_1FileNode.html">FileNode</a> &amp;fn)</td></tr>
<tr class="memdesc:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="mdescLeft"> </td><td class="mdescRight">Reads algorithm from the file node.  <a href="../../d3/d46/classcv_1_1Algorithm.html#ad8c591bacb34c485f5b7a250c314fc53">More...</a><br/></td></tr>
<tr class="separator:ad8c591bacb34c485f5b7a250c314fc53 inherit pub_static_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classcv_1_1Algorithm"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classcv_1_1Algorithm')"><img alt="-" src="../../closed.png"/> Protected Member Functions inherited from <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html">cv::Algorithm</a></td></tr>
<tr class="memitem:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a68eeca71617474ad3d4561786f0289d2">writeFormat</a> (<a class="el" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> &amp;fs) const</td></tr>
<tr class="separator:a68eeca71617474ad3d4561786f0289d2 inherit pro_methods_classcv_1_1Algorithm"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Support Vector Machines. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../dc/dd6/ml_intro.html#ml_intro_svm">Support Vector Machines </a> </dd></dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="aad7f1aaccced3c33bb256640910a0e56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad7f1aaccced3c33bb256640910a0e56">◆ </a></span>KernelTypes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56">cv::ml::SVM::KernelTypes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SVM kernel type </p>
<p>A comparison of different kernels on the following 2D test case with four classes. Four <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">SVM::C_SVC</a> SVMs have been trained (one against rest) with auto_train. Evaluation on three different kernels (<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a66a909b8add6114fde309d24483bcf82">SVM::CHI2</a>, <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a9dec0ceda288deaa617c4c65c88852ae">SVM::INTER</a>, <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a8e1f51ebeabd14cbd622f0f945831d4c">SVM::RBF</a>). The color depicts the class with max score. Bright means max-score &gt; 0, dark means max-score &lt; 0. </p><div class="image">
<img alt="SVM_Comparison.png" src="../../SVM_Comparison.png"/>
<div class="caption">
image</div></div>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56adc68154e13627786e405117dd64012a5"></a>CUSTOM </td><td class="fielddoc"><p>Returned by <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a2aa20328f134790adfdd186526e32c46">SVM::getKernelType</a> in case when custom kernel has been set </p>
</td></tr>
<tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56ab92a19ab0c193735c3fd71f938dd87e7"></a>LINEAR </td><td class="fielddoc"><p>Linear kernel. No mapping is done, linear discrimination (or regression) is done in the original feature space. It is the fastest option. \(K(x_i, x_j) = x_i^T x_j\). </p>
</td></tr>
<tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56a5fa32d793cd5f5d0bf64f55bb94a3f2e"></a>POLY </td><td class="fielddoc"><p>Polynomial kernel: \(K(x_i, x_j) = (\gamma x_i^T x_j + coef0)^{degree}, \gamma &gt; 0\). </p>
</td></tr>
<tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56a8e1f51ebeabd14cbd622f0f945831d4c"></a>RBF </td><td class="fielddoc"><p>Radial basis function (RBF), a good choice in most cases. \(K(x_i, x_j) = e^{-\gamma ||x_i - x_j||^2}, \gamma &gt; 0\). </p>
</td></tr>
<tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56ac40981025a9b8f3c1cd35cb015aac5cc"></a>SIGMOID </td><td class="fielddoc"><p>Sigmoid kernel: \(K(x_i, x_j) = \tanh(\gamma x_i^T x_j + coef0)\). </p>
</td></tr>
<tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56a66a909b8add6114fde309d24483bcf82"></a>CHI2 </td><td class="fielddoc"><p>Exponential Chi2 kernel, similar to the RBF kernel: \(K(x_i, x_j) = e^{-\gamma \chi^2(x_i,x_j)}, \chi^2(x_i,x_j) = (x_i-x_j)^2/(x_i+x_j), \gamma &gt; 0\). </p>
</td></tr>
<tr><td class="fieldname"><a id="aad7f1aaccced3c33bb256640910a0e56a9dec0ceda288deaa617c4c65c88852ae"></a>INTER </td><td class="fielddoc"><p>Histogram intersection kernel. A fast kernel. \(K(x_i, x_j) = min(x_i,x_j)\). </p>
</td></tr>
</table>
</div>
</div>
<a id="a32d2e8d21aaa4f58cdf9c27c102becf3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32d2e8d21aaa4f58cdf9c27c102becf3">◆ </a></span>ParamTypes</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3">cv::ml::SVM::ParamTypes</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SVM params type </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a32d2e8d21aaa4f58cdf9c27c102becf3a8eafc49ef685613b37e1b96351fd2bd1"></a>C </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a32d2e8d21aaa4f58cdf9c27c102becf3a9b81805a0cd06dc59c354b0ad6fc9e9a"></a>GAMMA </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a32d2e8d21aaa4f58cdf9c27c102becf3ae14aa4668daf05a4ea6918b10806acd5"></a>P </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a32d2e8d21aaa4f58cdf9c27c102becf3ae0c1409f55f0158101fcc5e07f095605"></a>NU </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a32d2e8d21aaa4f58cdf9c27c102becf3ae7112825b482d70cf5f04bc571f86e57"></a>COEF </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a32d2e8d21aaa4f58cdf9c27c102becf3a61a897bf6519f4be834ce379a1543869"></a>DEGREE </td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<a id="ab4b93a4c42bbe213ffd9fb3832c6c44f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4b93a4c42bbe213ffd9fb3832c6c44f">◆ </a></span>Types</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44f">cv::ml::SVM::Types</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>SVM type </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608"></a>C_SVC </td><td class="fielddoc"><p>C-Support Vector Classification. n-class classification (n \(\geq\) 2), allows imperfect separation of classes with penalty multiplier C for outliers. </p>
</td></tr>
<tr><td class="fieldname"><a id="ab4b93a4c42bbe213ffd9fb3832c6c44fa50c44a78c88f3cde09599fba4347134d"></a>NU_SVC </td><td class="fielddoc"><p>\(\nu\)-Support Vector Classification. n-class classification with possible imperfect separation. Parameter \(\nu\) (in the range 0..1, the larger the value, the smoother the decision boundary) is used instead of C. </p>
</td></tr>
<tr><td class="fieldname"><a id="ab4b93a4c42bbe213ffd9fb3832c6c44fa6951543a0c14a17a7e16d212b1e7dcaf"></a>ONE_CLASS </td><td class="fielddoc"><p>Distribution Estimation (One-class SVM). All the training data are from the same class, SVM builds a boundary that separates the class from the rest of the feature space. </p>
</td></tr>
<tr><td class="fieldname"><a id="ab4b93a4c42bbe213ffd9fb3832c6c44fac6fd17721f6a7b5c10f3ae48b78ed944"></a>EPS_SVR </td><td class="fielddoc"><p>\(\epsilon\)-Support Vector Regression. The distance between feature vectors from the training set and the fitting hyper-plane must be less than p. For outliers the penalty multiplier C is used. </p>
</td></tr>
<tr><td class="fieldname"><a id="ab4b93a4c42bbe213ffd9fb3832c6c44fa5b4b7e4b189d47be1765b3c6b19f6c80"></a>NU_SVR </td><td class="fielddoc"><p>\(\nu\)-Support Vector Regression. \(\nu\) is used instead of p. See <a class="el" href="../../d0/de3/citelist.html#CITEREF_LibSVM">[43]</a> for details. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2fe8b5bf897c34b8e911397b42e2cb44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fe8b5bf897c34b8e911397b42e2cb44">◆ </a></span>create()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html">SVM</a>&gt; cv::ml::SVM::create </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml.SVM_create(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Creates empty model. Use <a class="el" href="../../db/d7d/classcv_1_1ml_1_1StatModel.html#af96a0e04f1677a835cc25263c7db3c0c" title="Trains the statistical model. ">StatModel::train</a> to train the model. Since SVM has several parameters, you may want to find the best parameters for your problem, it can be done with <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a533d3d3f950fed3f75be0d8692eeff58" title="Trains an SVM with optimal parameters. ">SVM::trainAuto</a>. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a48">samples/cpp/train_HOG.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a77d9a35898cae44ac9071c4b35bc96a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77d9a35898cae44ac9071c4b35bc96a8">◆ </a></span>getC()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getC </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getC(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Parameter <em>C</em> of a SVM optimization problem. For <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">SVM::C_SVC</a>, <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fac6fd17721f6a7b5c10f3ae48b78ed944">SVM::EPS_SVR</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa5b4b7e4b189d47be1765b3c6b19f6c80">SVM::NU_SVR</a>. Default value is 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#af9f543ef011db0ded375bb6f68984142">setC</a> </dd></dl>
</div>
</div>
<a id="abca95c581c70bf46625d1b6fda723ea7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abca95c581c70bf46625d1b6fda723ea7">◆ </a></span>getClassWeights()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> cv::ml::SVM::getClassWeights </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getClassWeights(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Optional weights in the <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">SVM::C_SVC</a> problem, assigned to particular classes. They are multiplied by <em>C</em> so the parameter <em>C</em> of class <em>i</em> becomes <code>classWeights(i) * C</code>. Thus these weights affect the misclassification penalty for different classes. The larger weight, the larger penalty on misclassification of data from the corresponding class. Default value is empty <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9cb80c3df6c2626b9836eaa0e0c58bf0">setClassWeights</a> </dd></dl>
</div>
</div>
<a id="a87ca59782f9bd71db63602fa439a791e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87ca59782f9bd71db63602fa439a791e">◆ </a></span>getCoef0()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getCoef0 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getCoef0(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Parameter <em>coef0</em> of a kernel function. For <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a5fa32d793cd5f5d0bf64f55bb94a3f2e">SVM::POLY</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56ac40981025a9b8f3c1cd35cb015aac5cc">SVM::SIGMOID</a>. Default value is 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#af0cd3684aabfacbd6749d8649d5971ed">setCoef0</a> </dd></dl>
</div>
</div>
<a id="a63ebdd598b0c30942130ed4768f2836e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63ebdd598b0c30942130ed4768f2836e">◆ </a></span>getDecisionFunction()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getDecisionFunction </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>svidx</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, alpha, svidx</td><td>=</td><td>cv.ml_SVM.getDecisionFunction(</td><td class="paramname">i[, alpha[, svidx]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Retrieves the decision function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td>the index of the decision function. If the problem solved is regression, 1-class or 2-class classification, then there will be just one decision function and the index should always be 0. Otherwise, in the case of N-class classification, there will be \(N(N-1)/2\) decision functions. </td></tr>
    <tr><td class="paramname">alpha</td><td>the optional output vector for weights, corresponding to different support vectors. In the case of linear SVM all the alpha's will be 1's. </td></tr>
    <tr><td class="paramname">svidx</td><td>the optional output vector of indices of support vectors within the matrix of support vectors (which can be retrieved by <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a2c3fb4b3c80b8fce0b8654f103339300" title="Retrieves all the support vectors. ">SVM::getSupportVectors</a>). In the case of linear SVM each decision function consists of a single "compressed" support vector.</td></tr>
  </table>
  </dd>
</dl>
<p>The method returns rho parameter of the decision function, a scalar subtracted from the weighted sum of kernel responses. </p>
</div>
</div>
<a id="a6b2f6c05fc049ef837999d51486aa633"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b2f6c05fc049ef837999d51486aa633">◆ </a></span>getDefaultGrid()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> cv::ml::SVM::getDefaultGrid </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>param_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Generates a grid for SVM parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">param_id</td><td>SVM parameters IDs that must be one of the <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3" title="SVM params type ">SVM::ParamTypes</a>. The grid is generated for the parameter with this ID.</td></tr>
  </table>
  </dd>
</dl>
<p>The function generates a grid for the specified parameter of the SVM algorithm. The grid may be passed to the function <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a533d3d3f950fed3f75be0d8692eeff58" title="Trains an SVM with optimal parameters. ">SVM::trainAuto</a>. </p>
</div>
</div>
<a id="a9290154cae38e7441b2d51b00d66fa02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9290154cae38e7441b2d51b00d66fa02">◆ </a></span>getDefaultGridPtr()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a>&gt; cv::ml::SVM::getDefaultGridPtr </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>param_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml.SVM_getDefaultGridPtr(</td><td class="paramname">param_id</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Generates a grid for SVM parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">param_id</td><td>SVM parameters IDs that must be one of the <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3" title="SVM params type ">SVM::ParamTypes</a>. The grid is generated for the parameter with this ID.</td></tr>
  </table>
  </dd>
</dl>
<p>The function generates a grid pointer for the specified parameter of the SVM algorithm. The grid may be passed to the function <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a533d3d3f950fed3f75be0d8692eeff58" title="Trains an SVM with optimal parameters. ">SVM::trainAuto</a>. </p>
</div>
</div>
<a id="a0e8b98786b1a14925cb571cf17b858e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e8b98786b1a14925cb571cf17b858e8">◆ </a></span>getDegree()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getDegree </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getDegree(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Parameter <em>degree</em> of a kernel function. For <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a5fa32d793cd5f5d0bf64f55bb94a3f2e">SVM::POLY</a>. Default value is 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a756297055239fa33536c09b0f5721494">setDegree</a> </dd></dl>
</div>
</div>
<a id="a5af1a2ed6d9c0c9e4eae6b749ae61439"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5af1a2ed6d9c0c9e4eae6b749ae61439">◆ </a></span>getGamma()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getGamma </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getGamma(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Parameter \(\gamma\) of a kernel function. For <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a5fa32d793cd5f5d0bf64f55bb94a3f2e">SVM::POLY</a>, <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a8e1f51ebeabd14cbd622f0f945831d4c">SVM::RBF</a>, <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56ac40981025a9b8f3c1cd35cb015aac5cc">SVM::SIGMOID</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a66a909b8add6114fde309d24483bcf82">SVM::CHI2</a>. Default value is 1. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a1e15d72e1bbba64a9650ea65910135e7">setGamma</a> </dd></dl>
</div>
</div>
<a id="a2aa20328f134790adfdd186526e32c46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2aa20328f134790adfdd186526e32c46">◆ </a></span>getKernelType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::ml::SVM::getKernelType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getKernelType(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Type of a SVM kernel. See <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56" title="SVM kernel type ">SVM::KernelTypes</a>. Default value is <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56a8e1f51ebeabd14cbd622f0f945831d4c">SVM::RBF</a>. </p>
</div>
</div>
<a id="ad1f4a836048fd63bb2509e9eb70a520b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1f4a836048fd63bb2509e9eb70a520b">◆ </a></span>getNu()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getNu </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getNu(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Parameter \(\nu\) of a SVM optimization problem. For <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa50c44a78c88f3cde09599fba4347134d">SVM::NU_SVC</a>, <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa6951543a0c14a17a7e16d212b1e7dcaf">SVM::ONE_CLASS</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa5b4b7e4b189d47be1765b3c6b19f6c80">SVM::NU_SVR</a>. Default value is 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aa19ae35bcf07f52a4009ceeca583b113">setNu</a> </dd></dl>
</div>
</div>
<a id="a3672572f111c14f7fd0d392db1709413"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3672572f111c14f7fd0d392db1709413">◆ </a></span>getP()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual double cv::ml::SVM::getP </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getP(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Parameter \(\epsilon\) of a SVM optimization problem. For <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fac6fd17721f6a7b5c10f3ae48b78ed944">SVM::EPS_SVR</a>. Default value is 0. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aed346ecd8b15379717053254ae067d96">setP</a> </dd></dl>
</div>
</div>
<a id="a2c3fb4b3c80b8fce0b8654f103339300"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c3fb4b3c80b8fce0b8654f103339300">◆ </a></span>getSupportVectors()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ml::SVM::getSupportVectors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getSupportVectors(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Retrieves all the support vectors. </p>
<p>The method returns all the support vectors as a floating-point matrix, where support vectors are stored as matrix rows. </p>
</div>
</div>
<a id="a11a5f5186656d7a45f7d70b85ad75e54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11a5f5186656d7a45f7d70b85ad75e54">◆ </a></span>getTermCriteria()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">cv::TermCriteria</a> cv::ml::SVM::getTermCriteria </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getTermCriteria(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Termination criteria of the iterative SVM training procedure which solves a partial case of constrained quadratic optimization problem. You can specify tolerance and/or the maximum number of iterations. Default value is <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html" title="The class defining termination criteria for iterative algorithms. ">TermCriteria</a>( <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a56ca2bc5cd06345060a1c1c66a8fc06e" title="ditto ">TermCriteria::MAX_ITER</a> + <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5" title="the desired accuracy or change in parameters at which the iterative algorithm stops ...">TermCriteria::EPS</a>, 1000, FLT_EPSILON )</code>; </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6a86483c5518c332fedf6ec381a1daa7">setTermCriteria</a> </dd></dl>
</div>
</div>
<a id="a65c5ef227073493731ae8133bf372586"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65c5ef227073493731ae8133bf372586">◆ </a></span>getType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int cv::ml::SVM::getType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getType(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Type of a SVM formulation. See <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44f" title="SVM type ">SVM::Types</a>. Default value is <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">SVM::C_SVC</a>. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a0dd2c2aea178a3c9136eda6443d5bb7b">setType</a> </dd></dl>
</div>
</div>
<a id="a40356a96b18fbf38c1d9f73f546844c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40356a96b18fbf38c1d9f73f546844c9">◆ </a></span>getUncompressedSupportVectors()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::ml::SVM::getUncompressedSupportVectors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.getUncompressedSupportVectors(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Retrieves all the uncompressed support vectors of a linear SVM. </p>
<p>The method returns all the uncompressed support vectors of a linear SVM that the compressed support vector, used for prediction, was derived from. They are returned in a floating-point matrix, where the support vectors are stored as matrix rows. </p>
</div>
</div>
<a id="a7b05db6110aec2246f2b31363937539c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b05db6110aec2246f2b31363937539c">◆ </a></span>load()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html">SVM</a>&gt; cv::ml::SVM::load </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>filepath</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml.SVM_load(</td><td class="paramname">filepath</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Loads and creates a serialized svm from a file. </p>
<p>Use <a class="el" href="../../d3/d46/classcv_1_1Algorithm.html#a0a880744bc4e3f45711444571df47d67">SVM::save</a> to serialize and store an <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html" title="Support Vector Machines. ">SVM</a> to disk. Load the <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html" title="Support Vector Machines. ">SVM</a> from this file again, by calling this function with the path to the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filepath</td><td>path to serialized svm </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="af9f543ef011db0ded375bb6f68984142"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9f543ef011db0ded375bb6f68984142">◆ </a></span>setC()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setC </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setC(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a77d9a35898cae44ac9071c4b35bc96a8">getC</a> </dd></dl>
</div>
</div>
<a id="a9cb80c3df6c2626b9836eaa0e0c58bf0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9cb80c3df6c2626b9836eaa0e0c58bf0">◆ </a></span>setClassWeights()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setClassWeights </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> &amp; </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setClassWeights(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#abca95c581c70bf46625d1b6fda723ea7">getClassWeights</a> </dd></dl>
</div>
</div>
<a id="af0cd3684aabfacbd6749d8649d5971ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0cd3684aabfacbd6749d8649d5971ed">◆ </a></span>setCoef0()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setCoef0 </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setCoef0(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a87ca59782f9bd71db63602fa439a791e">getCoef0</a> </dd></dl>
</div>
</div>
<a id="a16a3ddfd7bad030268f024f5a6c561f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16a3ddfd7bad030268f024f5a6c561f1">◆ </a></span>setCustomKernel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setCustomKernel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d7/db8/classcv_1_1ml_1_1SVM_1_1Kernel.html">Kernel</a> &gt; &amp; </td>
          <td class="paramname"><em>_kernel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Initialize with custom kernel. See <a class="el" href="../../d7/db8/classcv_1_1ml_1_1SVM_1_1Kernel.html">SVM::Kernel</a> class for implementation details </p>
</div>
</div>
<a id="a756297055239fa33536c09b0f5721494"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a756297055239fa33536c09b0f5721494">◆ </a></span>setDegree()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setDegree </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setDegree(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a0e8b98786b1a14925cb571cf17b858e8">getDegree</a> </dd></dl>
</div>
</div>
<a id="a1e15d72e1bbba64a9650ea65910135e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e15d72e1bbba64a9650ea65910135e7">◆ </a></span>setGamma()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setGamma </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setGamma(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a5af1a2ed6d9c0c9e4eae6b749ae61439">getGamma</a> </dd></dl>
</div>
</div>
<a id="ad6f4f45983d06817b9782978ca0f6f6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6f4f45983d06817b9782978ca0f6f6f">◆ </a></span>setKernel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setKernel </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>kernelType</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setKernel(</td><td class="paramname">kernelType</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Initialize with one of predefined kernels. See <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#aad7f1aaccced3c33bb256640910a0e56" title="SVM kernel type ">SVM::KernelTypes</a>. </p>
</div>
</div>
<a id="aa19ae35bcf07f52a4009ceeca583b113"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa19ae35bcf07f52a4009ceeca583b113">◆ </a></span>setNu()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setNu </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setNu(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ad1f4a836048fd63bb2509e9eb70a520b">getNu</a> </dd></dl>
</div>
</div>
<a id="aed346ecd8b15379717053254ae067d96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed346ecd8b15379717053254ae067d96">◆ </a></span>setP()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setP </td>
          <td>(</td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setP(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a3672572f111c14f7fd0d392db1709413">getP</a> </dd></dl>
</div>
</div>
<a id="a6a86483c5518c332fedf6ec381a1daa7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a86483c5518c332fedf6ec381a1daa7">◆ </a></span>setTermCriteria()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setTermCriteria </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">cv::TermCriteria</a> &amp; </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setTermCriteria(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a11a5f5186656d7a45f7d70b85ad75e54">getTermCriteria</a> </dd></dl>
</div>
</div>
<a id="a0dd2c2aea178a3c9136eda6443d5bb7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0dd2c2aea178a3c9136eda6443d5bb7b">◆ </a></span>setType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::ml::SVM::setType </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>val</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.ml_SVM.setType(</td><td class="paramname">val</td><td>)</td></tr></table>
</div><div class="memdoc">
<p></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a65c5ef227073493731ae8133bf372586">getType</a> </dd></dl>
</div>
</div>
<a id="a533d3d3f950fed3f75be0d8692eeff58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a533d3d3f950fed3f75be0d8692eeff58">◆ </a></span>trainAuto() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::ml::SVM::trainAuto </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html">TrainData</a> &gt; &amp; </td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>kFold</em> = <code>10</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td>
          <td class="paramname"><em>Cgrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a8eafc49ef685613b37e1b96351fd2bd1">C</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td>
          <td class="paramname"><em>gammaGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a9b81805a0cd06dc59c354b0ad6fc9e9a">GAMMA</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td>
          <td class="paramname"><em>pGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae14aa4668daf05a4ea6918b10806acd5">P</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td>
          <td class="paramname"><em>nuGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae0c1409f55f0158101fcc5e07f095605">NU</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td>
          <td class="paramname"><em>coeffGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae7112825b482d70cf5f04bc571f86e57">COEF</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> </td>
          <td class="paramname"><em>degreeGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633">getDefaultGrid</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a61a897bf6519f4be834ce379a1543869">DEGREE</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>balanced</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.trainAuto(</td><td class="paramname">samples, layout, responses[, kFold[, Cgrid[, gammaGrid[, pGrid[, nuGrid[, coeffGrid[, degreeGrid[, balanced]]]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Trains an SVM with optimal parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>the training data that can be constructed using <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html#a5e0c052f9aadce1f75cddbdbbf9c4f4d" title="Creates training data from in-memory arrays. ">TrainData::create</a> or <a class="el" href="../../dc/d32/classcv_1_1ml_1_1TrainData.html#ab3264a32194126ff8d6821e76018cde3" title="Reads the dataset from a .csv file and returns the ready-to-use training data. ">TrainData::loadFromCSV</a>. </td></tr>
    <tr><td class="paramname">kFold</td><td>Cross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is executed kFold times. </td></tr>
    <tr><td class="paramname">Cgrid</td><td>grid for C </td></tr>
    <tr><td class="paramname">gammaGrid</td><td>grid for gamma </td></tr>
    <tr><td class="paramname">pGrid</td><td>grid for p </td></tr>
    <tr><td class="paramname">nuGrid</td><td>grid for nu </td></tr>
    <tr><td class="paramname">coeffGrid</td><td>grid for coeff </td></tr>
    <tr><td class="paramname">degreeGrid</td><td>grid for degree </td></tr>
    <tr><td class="paramname">balanced</td><td>If true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.</td></tr>
  </table>
  </dd>
</dl>
<p>The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.</p>
<p>If there is no need to optimize a parameter, the corresponding grid step should be set to any value less than or equal to 1. For example, to avoid optimization in gamma, set <code>gammaGrid.step = 0</code>, <code>gammaGrid.minVal</code>, <code>gamma_grid.maxVal</code> as arbitrary numbers. In this case, the value <code>Gamma</code> is taken for gamma.</p>
<p>And, finally, if the optimization in a parameter is required but the corresponding grid is unknown, you may call the function <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633" title="Generates a grid for SVM parameters. ">SVM::getDefaultGrid</a>. To generate a grid, for example, for gamma, call <code>SVM::getDefaultGrid(SVM::GAMMA)</code>.</p>
<p>This function works for the classification (<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">SVM::C_SVC</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa50c44a78c88f3cde09599fba4347134d">SVM::NU_SVC</a>) as well as for the regression (<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fac6fd17721f6a7b5c10f3ae48b78ed944">SVM::EPS_SVR</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa5b4b7e4b189d47be1765b3c6b19f6c80">SVM::NU_SVR</a>). If it is <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa6951543a0c14a17a7e16d212b1e7dcaf">SVM::ONE_CLASS</a>, no optimization is made and the usual SVM with parameters specified in params is executed. </p>
</div>
</div>
<a id="a4ce36fa4ff20944f24554d8ddd1f1fbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ce36fa4ff20944f24554d8ddd1f1fbf">◆ </a></span>trainAuto() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool cv::ml::SVM::trainAuto </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>samples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>layout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>responses</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>kFold</em> = <code>10</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td>
          <td class="paramname"><em>Cgrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a8eafc49ef685613b37e1b96351fd2bd1">SVM::C</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td>
          <td class="paramname"><em>gammaGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a9b81805a0cd06dc59c354b0ad6fc9e9a">SVM::GAMMA</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td>
          <td class="paramname"><em>pGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae14aa4668daf05a4ea6918b10806acd5">SVM::P</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td>
          <td class="paramname"><em>nuGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae0c1409f55f0158101fcc5e07f095605">SVM::NU</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td>
          <td class="paramname"><em>coeffGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3ae7112825b482d70cf5f04bc571f86e57">SVM::COEF</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d6/dca/classcv_1_1ml_1_1ParamGrid.html">ParamGrid</a> &gt; </td>
          <td class="paramname"><em>degreeGrid</em> = <code><a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a9290154cae38e7441b2d51b00d66fa02">SVM::getDefaultGridPtr</a>(<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a32d2e8d21aaa4f58cdf9c27c102becf3a61a897bf6519f4be834ce379a1543869">SVM::DEGREE</a>)</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>balanced</em> = <code>false</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.ml_SVM.trainAuto(</td><td class="paramname">samples, layout, responses[, kFold[, Cgrid[, gammaGrid[, pGrid[, nuGrid[, coeffGrid[, degreeGrid[, balanced]]]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Trains an SVM with optimal parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">samples</td><td>training samples </td></tr>
    <tr><td class="paramname">layout</td><td>See <a class="el" href="../../dd/ded/group__ml.html#ga9c57a2b823008dda53d2c7f7059a8710" title="Sample types. ">ml::SampleTypes</a>. </td></tr>
    <tr><td class="paramname">responses</td><td>vector of responses associated with the training samples. </td></tr>
    <tr><td class="paramname">kFold</td><td>Cross-validation parameter. The training set is divided into kFold subsets. One subset is used to test the model, the others form the train set. So, the SVM algorithm is </td></tr>
    <tr><td class="paramname">Cgrid</td><td>grid for C </td></tr>
    <tr><td class="paramname">gammaGrid</td><td>grid for gamma </td></tr>
    <tr><td class="paramname">pGrid</td><td>grid for p </td></tr>
    <tr><td class="paramname">nuGrid</td><td>grid for nu </td></tr>
    <tr><td class="paramname">coeffGrid</td><td>grid for coeff </td></tr>
    <tr><td class="paramname">degreeGrid</td><td>grid for degree </td></tr>
    <tr><td class="paramname">balanced</td><td>If true and the problem is 2-class classification then the method creates more balanced cross-validation subsets that is proportions between classes in subsets are close to such proportion in the whole train dataset.</td></tr>
  </table>
  </dd>
</dl>
<p>The method trains the SVM model automatically by choosing the optimal parameters C, gamma, p, nu, coef0, degree. Parameters are considered optimal when the cross-validation estimate of the test set error is minimal.</p>
<p>This function only makes use of <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#a6b2f6c05fc049ef837999d51486aa633" title="Generates a grid for SVM parameters. ">SVM::getDefaultGrid</a> for parameter optimization and thus only offers rudimentary parameter options.</p>
<p>This function works for the classification (<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa18157ccaec6a252b901cff6de285d608">SVM::C_SVC</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa50c44a78c88f3cde09599fba4347134d">SVM::NU_SVC</a>) as well as for the regression (<a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fac6fd17721f6a7b5c10f3ae48b78ed944">SVM::EPS_SVR</a> or <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa5b4b7e4b189d47be1765b3c6b19f6c80">SVM::NU_SVR</a>). If it is <a class="el" href="../../d1/d2d/classcv_1_1ml_1_1SVM.html#ab4b93a4c42bbe213ffd9fb3832c6c44fa6951543a0c14a17a7e16d212b1e7dcaf">SVM::ONE_CLASS</a>, no optimization is made and the usual SVM with parameters specified in params is executed. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../d3/d29/ml_8hpp.html">ml.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:48 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
